package com.ibeetl.admin.aod.service.excel.task;

import com.ibeetl.admin.aod.service.excel.match.MatchManager;
import com.ibeetl.admin.aod.web.query.FilterQuery;

import java.io.File;
import java.util.concurrent.Callable;

public class ExcelFilterTask implements Callable<Integer> {

    private MatchManager matchManager;

    private File originalFile;

    private FilterQuery filterQuery;

    private String batchNo;

    public ExcelFilterTask(FilterQuery filterQuery, String batchNo, File originalFile, MatchManager matchManager) {
        this.filterQuery = filterQuery;
        this.batchNo = batchNo;
        this.originalFile = originalFile;
        this.matchManager = matchManager;
    }

    @Override
    public Integer call() {

        matchManager.matchByCsv(originalFile, filterQuery, batchNo);

        return 1;
    }
}
